package com.zzy.controller;

import com.zzy.model.AjaxMsg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

//import org.activiti.engine.task.Task;


@RestController
@RequestMapping("/test/")
//http://localhost:8089/zzy_util/test/test
public class TestController {

    @Value("${spring.datasource.username}")
    private String username;

    // password 被加密了。不能获取
//    @Value("${spring.datasource.passsword}")
//    private String passsword;

    @RequestMapping("test")
    public AjaxMsg test(){
        return AjaxMsg.returnAjaxMsg("测试啊！");
    }

    @RequestMapping("testp")
    public AjaxMsg testp(){
        return AjaxMsg.returnAjaxMsg(username );
    }

}
